﻿Imports System.Collections.Generic
Imports System.Globalization
Public Class CountryList
    Public countryList As New DataTable

    Public Sub New()
        countryList.Columns.Clear()
        countryList.Columns.Add("clCountryCode", GetType(String))
        countryList.Columns.Add("clCountryName", GetType(String))
        countryList.Columns.Add("clCountryCurrencyName", GetType(String))
        countryList.Columns.Add("clCountryCurrencySymbol", GetType(String))
        countryList.Columns.Add("clCountryCurrencyISO", GetType(String))
        Dim list As New ListBox
        For Each ci As CultureInfo In CultureInfo.GetCultures(CultureTypes.FrameworkCultures)
            Dim ri As RegionInfo
            Try
                ri = New RegionInfo(ci.Name)
            Catch
                Continue For
            End Try
            If Not list.Items.Contains(ri.ThreeLetterISORegionName) Then
                countryList.Rows.Add(ri.ThreeLetterISORegionName, ri.EnglishName, ri.CurrencyEnglishName, ri.CurrencySymbol, ri.ISOCurrencySymbol)
                list.Items.Add(ri.ThreeLetterISORegionName)
            End If
        Next
    End Sub
End Class
